#使用readlines()方法，读取所有行
f = open('f.txt','r',encoding='utf-8')
print(f.readlines())
f.close()

#使用readlines()方法，去除换行符
f = open('f.txt','r',encoding='utf-8')
for line in f.readlines():
    print(line.strip())
f.close()